using Proto;
using Serilog;
using Summer.Network;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NetStart : BehaviourSingleton<NetStart>
{
    [Header("服务器信息")]
    public string host = "127.0.0.1";
    public int port = 32510;
    public void Init()
    {
        NetClient.ConnectToServer(host, port);
    }

    private void _UserLoginResponse(Connection sender, UserLoginResponse msg)
    {
        UnityMainThreadDispatcher.Instance().Enqueue(() =>
        {
            Debug.Log("成功收到了登录成功的信息"+msg.Message);
            Log.Logger.Debug("成功收到了登录成功的信息" + msg.Message);
        });
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void Login()
    {
        
    }
}
